import jade.content.onto.BasicOntology;
import jade.content.onto.Ontology;
import jade.content.onto.OntologyException;
import jade.content.schema.AgentActionSchema;
import jade.content.schema.ObjectSchema;
import jade.content.schema.PrimitiveSchema;


public class MessageOntology extends Ontology implements AgentVocabulary{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public static final String ONTOLOGY_NAME = "MessageOntology";

	// ----------> The singleton instance of this ontology
	private static Ontology instance = new MessageOntology();

	// ----------> Method to access the singleton ontology object
	public static Ontology getInstance() { return instance; }
	private MessageOntology(){
		super(ONTOLOGY_NAME, BasicOntology.getInstance());
		try {
			AgentActionSchema as;
			add(as = new AgentActionSchema(CLASSNAME), MessageBody.class);
			as.add(CONTENT, (PrimitiveSchema) getSchema(BasicOntology.STRING), ObjectSchema.MANDATORY);
			as.add(ACTION, (PrimitiveSchema) getSchema(BasicOntology.STRING), ObjectSchema.MANDATORY);			
			as.add(PRET, (PrimitiveSchema) getSchema(BasicOntology.INTEGER), ObjectSchema.OPTIONAL);
			}
			catch (OntologyException oe) {
			oe.printStackTrace();
			}
	}
}
